package com.hl.sfzy.controller.course;

import com.hl.sfzy.entity.course.Coursemark;
import com.hl.sfzy.service.course.CourseMarkService;
import com.hl.sfzy.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: sfzy
 * @description:
 * @author: xiaoyan
 * @create: 2024-09-10 14:21
 **/

@RestController
@RequestMapping("/courseMark")
public class CourseMarkController {

    @Autowired
    private CourseMarkService courseMarkService;

    @GetMapping("/evaluation")
    public R selectAllByCourseId(Long id){
        List<Coursemark> coursemarks = courseMarkService.selectAllByCourseId(id);
        return R.success(coursemarks);
    }
}
